CREATE EXTERNAL TABLE jms_dm.dm_network_bagging_rate_dt(
  date_time date COMMENT '日期', 
  proxyarea_code string COMMENT '代理区编码', 
  proxyarea_name string COMMENT '代理区名称', 
  region_code string COMMENT '大区编码', 
  region_name string COMMENT '大区名称', 
  franchisees_code string COMMENT '加盟商编码', 
  franchisees_name string COMMENT '加盟商名称', 
  site_code string COMMENT '网点编码', 
  site_name string COMMENT '网点名称', 
  order_source_code string COMMENT '订单来源code', 
  order_source_name string COMMENT '订单来源', 
  need_bagging_no_qty int COMMENT '需建包票数', 
  real_bagging_qty int COMMENT '已建包数(发出已建包票数)', 
  need_bagging_qty int COMMENT '应建包票数', 
  need_real_baging_qty int COMMENT '实建包票数', 
  no_bagging_qty int COMMENT '应建未建票数', 
  total_baging_qty int COMMENT '总建包票数', 
  err_baging_qty int COMMENT '错建包票数', 
  breach_bagging_qty int COMMENT '违规建包数', 
  dwg_need_bagging_qty int COMMENT '文件类应建包', 
  dwg_real_bagging_qty int COMMENT '文件类已建包(文件发出已建包)', 
  reback_need_bagging_qty int COMMENT '退转件应建包票数', 
  reback_real_bagging_qty int COMMENT '退转件实建包票数', 
  all_need_bagging_qty int COMMENT '全网应建包数', 
  all_rael_bagging_qty int COMMENT '全网已建包数', 
  site_type int COMMENT '网点类型 3集散 4网点 2中心')
COMMENT '网点建包率汇总'
 PARTITIONED BY (dt STRING COMMENT '时间分区')
    STORED AS PARQUET
    LOCATION '/dw/hive/jms_dm.db/external/dm_network_bagging_rate_dt'
    TBLPROPERTIES (
        'discover.partitions' = 'false',
        'parquet.column.index.access' = 'true'
        );
